package model.vo

import model.enums.NettyUdpPackageType

/**
 * @author wei kunJie
 * @date 2024/3/22 20:26:09
 */
class NettyUdpVo {
    var id: Long? = null
    var type: NettyUdpPackageType? = null
    var data: Map<String, Any>? = null

    class NettyUdpDataBuilder private constructor() {
        private val data: MutableMap<String, Any>

        init {
            data = HashMap()
        }

        fun put(key: String, value: Any): NettyUdpDataBuilder {
            data[key] = value
            return this
        }

        fun build(): Map<String, Any> {
            return data
        }

        companion object {
            fun builder(): NettyUdpDataBuilder {
                return NettyUdpDataBuilder()
            }
        }
    }
}